package org.regotto.common;

import java.util.Arrays;

public class Utils {

    public static void swap(int[] q, int i, int j) {
        int t = q[i];
        q[i] = q[j];
        q[j] = t;
    }

    public static void printInts(int[] q) {
        for (int j : q) System.out.print(j + " ");
    }

    public static void full(int[][] d, int x) {
        for (int[] ints : d) {
            Arrays.fill(ints, x);
        }
    }

    public static void full(int[] d, int x) {
        Arrays.fill(d, x);
    }

    public static void arrCopy(int[] bak, int[] dist, int len) {
        if (len >= 0) System.arraycopy(dist, 0, bak, 0, len);
    }
}
